/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package e.odbo.data.dao;

import com.openbravo.data.basic.BasicException;
import e.odbo.data.dsl.query.QBFParameter;
import e.odbo.data.dsl.query.QBFParameters;
import e.odbo.data.bean.IKeyed;
import e.odbo.data.bean.I_BaseBean;
import e.odbo.data.bean.I_ViewBean;
import e.odbo.data.dsl.Select;

import java.util.Date;
import java.util.List;

/**
 * @author Administrator
 */
@Deprecated
 public interface I_DataLogic {

     int insert(I_BaseBean obj) throws BasicException;

     int update(I_BaseBean obj) throws BasicException;

     int delete(I_BaseBean obj) throws BasicException;

     int deleteByIKeyed(Class c, IKeyed k) throws BasicException;

     int deleteByQBFParameters(Class c, QBFParameters filter) throws BasicException;

     int insertObjs(List objs) throws BasicException;

     IKeyed insertAutoGenerator(I_BaseBean obj) throws BasicException;

     int updateObjs(List objs) throws BasicException;

     int deleteObjs(List objs) throws BasicException;

     int insertOrUpdate(final List objs) throws BasicException;

     int insertOrUpdate(I_BaseBean objs) throws BasicException;

     I_ViewBean find(Class c, IKeyed id) throws BasicException;

     I_ViewBean findByStringId(Class c, String id) throws BasicException;

     I_ViewBean findByIntId(Class c, int id) throws BasicException;

     List list(Class c) throws BasicException;

     List listBySelect(Class c,Select select)throws BasicException;

    // List listByFilter(Class c, Object filter) throws BasicException;

    // List listByFilterWithClassName(String c, Object filter) throws BasicException;

     List query(Class c, QBFParameters filter) throws BasicException;

     List queryByQBFParameter(Class c, QBFParameter filter) throws BasicException;

     List queryByQBFParameters(String c, QBFParameters filter) throws BasicException;

     List listByParent(Class c, I_ParentNode parent) throws BasicException;

     List list(Class c, Class parent, String id) throws BasicException;

     int updateByFieldWithIKeyed(IKeyed obj, String field, final Object newValue) throws BasicException;

     int updateByField(Class c, IKeyed obj, String field, final Object newValue) throws BasicException;

    int clear(Class c) throws BasicException;

     List listWithClassName(String name) throws BasicException;

     List listWithParentClassAndKey(String c, String parent, String id) throws BasicException;

     List listWithDateTime(Class c, Date start, Date end) throws BasicException;

     List listWithDateTimeByClassName(String c, Date start, Date end) throws BasicException;

     boolean isExistByField(Class c, String field, Object value) throws BasicException;

     boolean isExistByFields(Class c, String[] fields, Object[] values) throws BasicException;
}
